#include<iostream>
#include<string>

using namespace std;

int main()
{
    string strPath = "c:\\progream\\windows\\dabase\\my.ini";
    string strTmp;
    unsigned int nPos = strPath.find_last_of("\\");
    strTmp =  strPath.substr(0, nPos);
    strPath.erase(nPos);
    //strPath.erase(nPos, strPath.end());
    cout << strTmp << endl;
    cout << strPath <<endl;
    return 0;
}
